package club.monkeywood.service.buyer.impl;

import club.monkeywood.dataobject.Buyer;
import club.monkeywood.repository.BuyerRepository;
import club.monkeywood.service.buyer.BuyerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BuyerServiceImpl implements BuyerService {

    @Autowired
    private BuyerRepository buyerRepository;

    @Override
    public Buyer findByOpenid(String openid) {
        return buyerRepository.findByOpenid(openid);
    }

    @Override
    public Buyer save(Buyer buyer) {
        return buyerRepository.save(buyer);
    }

}
